<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>正则表达式</title>
    <script type="text/javascript">
        var str="Give 100%!";
        var patt1=/\W/g;
        document.write(str.match(patt1));
        console.log(patt1.test(str));
    </script>
</head>
<body>

</body>
</html>